import request from '@/utils/request'

// 获取待诊列表
export function getWaitingList() {
  return request({
    url: '/api/outpatient/registrations/waiting_list/',
    method: 'get'
  })
}

// 获取已叫号列表
export function getCalledList() {
  return request({
    url: '/api/outpatient/registrations/called_list/',
    method: 'get'
  })
}

// 获取已就诊列表
export function getTreatedList() {
  return request({
    url: '/api/outpatient/registrations/treated_list/',
    method: 'get'
  })
}

// 获取挂号记录详情
export function getRegistrationDetail(id: number) {
  return request({
    url: `/api/outpatient/registrations/${id}/`,
    method: 'get'
  })
}

// 创建挂号记录
export function createRegistration(data: any) {
  return request({
    url: '/api/outpatient/registrations/',
    method: 'post',
    data
  })
}

// 更新挂号记录
export function updateRegistration(id: number, data: any) {
  return request({
    url: `/api/outpatient/registrations/${id}/`,
    method: 'put',
    data
  })
}

// 删除挂号记录
export function deleteRegistration(id: number) {
  return request({
    url: `/api/outpatient/registrations/${id}/`,
    method: 'delete'
  })
} 